scivisfandomcom-20200213-history
ParaView Remote Interactivity Issues
Summary We investigated complaints of poor interactivity when ParaView was run remotely between the user's home and the LANL cluster called Lobo1. We successfully reproduced the loss of interactivity running ParaView between a home system and Lobo by adding visual elements to the rendered scene. Initially interactivity was fine, however as visual elements were added we experienced the loss of interactivity. We determined that the loss of interactivity was independent of input data set and data set size and was not linked to a specific visualisation technique which enabled us to reproduce on UCSD cluster called Nashi using ParaView's internal sources and test recording mechanism. By instrumenting the ParaView client server image delivery sub system we confirmed that frame rates dropped dramatically as as visual elements were added into the scene. We have identified the compression scheme employed by the image delivery subsystem at the root of the remote interactivity issues. ParaView's image delivery subsystem employs a run length encoding scheme developed by Sandia labs called "Squirt". Like all run length encoding schemes Squirt is fast but doesn't deliver high compression ratios. We found that the compression ratio degraded quickly as visual elements were added into the scene. We compared Squirt compression scheme against two popular compression schemes, zlib which is used in the linux gzip tool, and szip which is employed in HDF5 library. The tests show that, at its highest setting, zlib's compression ratio's are an order of magnitude higher than Squirt's across the board, however run time is also an order of magnitude slower. However, benchmarks show that ParaView's frame rates are also an order of magnitude longer than the run times, so run time is not a significant factor here. In order to confirm the result we implemented a second suite of in-situ tests implementing zlib compression in ParaView such that when Squirt was turned off, zlib was turned on. This enabled us to benchmark ParaView suing both Squirt and Zlib side by side on real test data. The results show that in the cases where Squirt's frame rates diminish to non interactive rates, using zlib produces a speed up of a factor of 4.39 which, although modest, provides significantly better interactivity with image delivery times dropping from from on average 5.25 seconds down to 1.19 seconds per frame. Results A Benchmark of Squirt and Zlib Compression in ParaView For this suite of tests we implemented zlib compression in ParaView so that a side by side comparsion of zlib and Squirt could be made under real world conditions. In these in-situ tests we seek to isolate the the compression scheme as much as possible and to stress test the algorithms in a worst case scenario. To this end in the render-server configuration dialog (Edit->Settings...->Render View->{General,Server}) we set the Remote Render Threshold to 0, disabled Image sub-sampling and set the LOD Threshold to 0. We set the Squirt compressor to loss-less mode at 24 bpp and zlib compressor to its highest setting which is also its slowest. The results summarised in the following table and histogram. For each scheme two renderings were used. The first is an outline of a two dimensional dataset. This rendering has large areas of uniform color and compresses well with both Squirt and Zlib resulting in interactive frame rates for both. The second rendering of a fractal image has a lot of color variation and is used to confound the compression schemes. It represents a worst case input that will cause Squirt compression ration to fall so low that frame rates are not interactive. In this case Squirt compression ratio drops dramatically to 2.9 and frame rates fall below interactive rates, with each frame taking on average 5.25 seconds. Zlib on the other hand delivers a 16.06 times higher compression ratio than Squirt resulting in a 4.39 times faster frame delivery rate. The speed up factor of 4.39 is a modest improvement, however zlib's average delivery rate of 1.2 seconds per frame is a significant improvement in interactivity over Squirts average delivery of 5.25 seconds per frame. Test Results Dataset Outline Fractal Image Squirt Compression Ratio 33.5397 2.93691 Avg. Seconds per Frame 0.478120 5.257553 ZLib-9 Compression Ratio 313.838 47.1934 Avg. Seconds per Frame 0.247824 1.197212 Avg. Speed Up 1.92927 4.3915 Avg. Reduction Factor 9.3572 16.0690 Input Datasets The following images are screen shots taken from ParaView during the tests. We used a saved state file to insure the same initial conditions and a automated test script generated using ParaView's Tools->record Test feature to insure reproducability. Images used for Frame Rate Benchmark A General Comparison of Loss-less Compression Schemes on Images rendered by ParaView The following table sumarises the test sequence we implemented to compare Squirt the current compression algorithm used in ParaView to two potential alternatives, szip and zlib. Each scheme was tested using various compression levels. Two passes were made over each input image. The first pass the full 24 bit BMP was processed. In the second pass, Squirts level 5 color reduction algorithm was applied. This results in 10 bit color data. The reduced color data was then used as input to each of the schemes. We did this to show case Squirt at its best and to level the playing field accounting for the fact that the other schemes tested were loss-less. The purpose of the tests were to compare Squirt to various alternatives, there for we used Squirt's timing and compressed data size as a basis for relative comparisons. Collumns Relative Time Delta and Relative Compression Ratio contain the primary results, while other columns contain the raw data. Squirt is a run length encoding(RLE) scheme and can be set to loss-less or lossy compression. Squirt's lossy compression uses a color depth reduction technique to increase run length. Squirt's strong point is its speed, of the schemes tested it was the fastest. It's weakness is that it achieves a relatively low compression ratio. Szip is a scheme available by HDF4 and HDF5 and patented by NASA. Our tests show that for typical images rendered by paraView szip does relatively poorly compared to Squirt and Zlib. However it is intersting to note that on most challenging input used in the tests szip performs reasonably well. Zlib is public domain implementation of deflate the scheme originally used in pkzip, has fixed memory requirements independent of input data size, and essentially never inflates data. At its highest setting zlib achieved the highest compression ratios an order of magnitude higher than Squirt for all test inputs. The trade off, is as is often the case, speed as runtime for zlib compressor is an order of magnitude longer than Squirt. However our in-situ benchmarks show that compressor run time does not contribute significantly to frame rate. Decreasing the color depth of the input images further increased the compression ratio and the run time for the zlib compressor. The results suggest that it will likely be worth while to pre-process rendered images by reducing the color depth much as is done for Squirt in typical use. Test Results Input Dataset Case Number Scheme Name Final size Compression Ratio Relative Compression Ratio Time Delta Relative Time Delta 1_streams.bmp 24 bpp 1597995 1 * Squirt-0 204388 7.81844 1 0.0130591 1 2 szip-ec 1320347 1.21028 0.154799 0.0280352 2.14678 3 szip-nn 1261476 1.26677 0.162023 0.0361311 2.76673 4 zlib-1 63113 25.3196 3.23845 0.0157809 1.20842 5 zlib-2 59978 26.643 3.40772 0.0160151 1.22635 6 zlib-3 50819 31.4448 4.02188 0.0168622 1.29121 7 zlib-5 41633 38.3829 4.90928 0.024646 1.88726 8 zlib-9 23779 67.2019 8.59532 0.194409 14.8868 1_streams.bmp 10 bpp 1597995 9 * Squirt-0 204364 7.81936 1 0.0118198 1 10 szip-ec 1320211 1.21041 0.154796 0.0267529 2.26339 11 szip-nn 1269975 1.25829 0.16092 0.0354099 2.9958 12 zlib-1 63117 25.318 3.23786 0.0157561 1.33302 13 zlib-2 59992 26.6368 3.40652 0.0160511 1.35798 14 zlib-3 50714 31.5099 4.02974 0.016974 1.43606 15 zlib-5 41507 38.4994 4.9236 0.0246332 2.08405 16 zlib-9 23729 67.3435 8.61242 0.193784 16.3948 2_streams.bmp 24 bpp 1597995 17 * Squirt-0 419484 3.80943 1 0.0156109 1 18 szip-ec 1315757 1.21451 0.318816 0.028928 1.85306 19 szip-nn 1271709 1.25657 0.329858 0.036212 2.31965 20 zlib-1 124372 12.8485 3.37282 0.0213711 1.36898 21 zlib-2 117238 13.6304 3.57805 0.0222421 1.42478 22 zlib-3 105137 15.1992 3.98988 0.0261979 1.67818 23 zlib-5 90809 17.5973 4.61941 0.035774 2.2916 24 zlib-9 67194 23.7818 6.24288 0.573777 36.7548 2_streams.bmp 10 bpp 1597995 25 * Squirt-0 419460 3.80965 1 0.0147369 1 26 szip-ec 1313854 1.21627 0.319259 0.0280142 1.90096 27 szip-nn 1279024 1.24939 0.327953 0.0354748 2.40721 28 zlib-1 124316 12.8543 3.37414 0.0213621 1.44956 29 zlib-2 117225 13.6319 3.57825 0.0221038 1.49989 30 zlib-3 105045 15.2125 3.99315 0.0260451 1.76734 31 zlib-5 90760 17.6068 4.62164 0.0358241 2.43091 32 zlib-9 67153 23.7963 6.24633 0.574763 39.0017 B_highres.bmp 24 bpp 6912000 33 * Squirt-0 2380100 2.90408 1 0.0646422 1 34 szip-ec 1710716 4.04041 1.39129 0.0686312 1.06171 35 szip-nn 2090999 3.3056 1.13826 0.079762 1.2339 36 zlib-1 1711898 4.03762 1.39033 0.136663 2.11414 37 zlib-2 1704298 4.05563 1.39653 0.138913 2.14895 38 zlib-3 1693065 4.08254 1.40579 0.141505 2.18905 39 zlib-5 1676255 4.12348 1.41989 0.179624 2.77874 40 zlib-9 1652838 4.1819 1.44001 0.818812 12.6668 B_highres.bmp 10 bpp 6912000 41 * Squirt-0 1873368 3.68961 1 0.0599349 1 42 szip-ec 1701702 4.06182 1.10088 0.0674322 1.12509 43 szip-nn 2077745 3.32668 0.901635 0.0791159 1.32003 44 zlib-1 815701 8.47369 2.29664 0.117282 1.95682 45 zlib-2 775508 8.91287 2.41567 0.120061 2.00319 46 zlib-3 695275 9.94139 2.69443 0.137728 2.29796 47 zlib-5 601728 11.4869 3.11331 0.205056 3.42131 48 zlib-9 531795 12.9975 3.52273 0.857498 14.3072 Input Datasets The fololwing images were used as comand line parameters to our test code. Input Images used for the General Comparsion Special Thanks Thanks to William Daughton of LANL for help identifying and reproducing the issue. Notes # Lobo - 272 compute nodes, 4,352 CPU, 38 TFLOPS system. Quad-core, quad-socket AMD Opteron w/ Infiniband. # Nashi - 22 compute nodes, 88 CPU, 264 G Ram, Dual-core, dual-socket AMD Opteron w/ Infiniband. # http://www.zlib.net/ # http://www.hdfgroup.org/doc_resource/SZIP/ bzip Input Dataset Case Number Scheme Name Final size Compression Ratio Relative Compression Ratio Time Delta Relative Time Delta 1_streams.bmp 24 bpp 1597995 1 * Squirt-0 204388 7.81844 1 0.0129869 1 2 bzip2 17983 88.8614 11.3656 1.08491 83.5389 3 szip-ec 1320347 1.21028 0.154799 0.028296 2.17881 4 szip-nn 1261476 1.26677 0.162023 0.0371189 2.85818 5 zlib-1 63113 25.3196 3.23845 0.0160182 1.23341 6 zlib-2 59978 26.643 3.40772 0.016247 1.25103 7 zlib-3 50819 31.4448 4.02188 0.0169539 1.30547 8 zlib-5 41633 38.3829 4.90928 0.0249569 1.9217 9 zlib-9 23779 67.2019 8.59532 0.198395 15.2766 1_streams.bmp 10 bpp 1597995 10 * Squirt-0 204364 7.81936 1 0.0115879 1 11 bzip2 18037 88.5954 11.3303 1.06032 91.5027 12 szip-ec 1320211 1.21041 0.154796 0.0272119 2.34831 13 szip-nn 1269975 1.25829 0.16092 0.0354619 3.06026 14 zlib-1 63117 25.318 3.23786 0.0159011 1.37222 15 zlib-2 59992 26.6368 3.40652 0.016022 1.38265 16 zlib-3 50714 31.5099 4.02974 0.0169501 1.46275 17 zlib-5 41507 38.4994 4.9236 0.0247781 2.13828 18 zlib-9 23729 67.3435 8.61242 0.194939 16.8227 2_streams.bmp 24 bpp 1597995 19 * Squirt-0 419484 3.80943 1 0.0146198 1 20 bzip2 54793 29.1642 7.6558 1.14301 78.1825 21 szip-ec 1315757 1.21451 0.318816 0.0280459 1.91835 22 szip-nn 1271709 1.25657 0.329858 0.036443 2.49271 23 zlib-1 124372 12.8485 3.37282 0.0214181 1.465 24 zlib-2 117238 13.6304 3.57805 0.022202 1.51862 25 zlib-3 105137 15.1992 3.98988 0.026396 1.8055 26 zlib-5 90809 17.5973 4.61941 0.0358138 2.44967 27 zlib-9 67194 23.7818 6.24288 0.576586 39.4386 2_streams.bmp 10 bpp 1597995 28 * Squirt-0 419460 3.80965 1 0.0148642 1 29 bzip2 54255 29.4534 7.73127 1.15066 77.4113 30 szip-ec 1313854 1.21627 0.319259 0.0280511 1.88716 31 szip-nn 1279024 1.24939 0.327953 0.0356929 2.40127 32 zlib-1 124316 12.8543 3.37414 0.0213909 1.43909 33 zlib-2 117225 13.6319 3.57825 0.0222051 1.49386 34 zlib-3 105045 15.2125 3.99315 0.026155 1.7596 35 zlib-5 90760 17.6068 4.62164 0.0358059 2.40887 36 zlib-9 67153 23.7963 6.24633 0.57711 38.8255 3_streams.bmp 24 bpp 2274972 37 * Squirt-0 1121496 2.02852 1 0.0238562 1 38 bzip2 403290 5.64103 2.78087 1.37653 57.7014 39 szip-ec 1877047 1.212 0.597479 0.0396199 1.66078 40 szip-nn 1817319 1.25183 0.617116 0.0500391 2.09753 41 zlib-1 591032 3.84915 1.89752 0.049825 2.08856 42 zlib-2 581480 3.91238 1.92869 0.0515301 2.16003 43 zlib-3 561139 4.0542 1.99861 0.0561171 2.35231 44 zlib-5 547613 4.15434 2.04797 0.0731561 3.06655 45 zlib-9 528576 4.30396 2.12173 0.180612 7.57088 3_streams.bmp 10 bpp 2274972 46 * Squirt-0 592936 3.83679 1 0.0201199 1 47 bzip2 117556 19.3522 5.04386 1.42497 70.824 48 szip-ec 1876300 1.21248 0.316013 0.038754 1.92615 49 szip-nn 1824309 1.24703 0.32502 0.0497911 2.47472 50 zlib-1 244064 9.32121 2.42943 0.0361581 1.79713 51 zlib-2 234740 9.69145 2.52593 0.0383961 1.90836 52 zlib-3 211535 10.7546 2.80302 0.0457931 2.27601 53 zlib-5 180527 12.6018 3.28447 0.063988 3.18033 54 zlib-9 151777 14.9889 3.90663 0.382984 19.0351 B_highres.bmp 24 bpp 6912000 55 * Squirt-0 2380100 2.90408 1 0.0651 1 56 bzip2 1214540 5.69104 1.95967 0.486807 7.47784 57 szip-ec 1710716 4.04041 1.39129 0.0686991 1.05529 58 szip-nn 2090999 3.3056 1.13826 0.079988 1.2287 59 zlib-1 1711898 4.03762 1.39033 0.136832 2.10188 60 zlib-2 1704298 4.05563 1.39653 0.139035 2.13572 61 zlib-3 1693065 4.08254 1.40579 0.141839 2.17878 62 zlib-5 1676255 4.12348 1.41989 0.180028 2.76541 63 zlib-9 1652838 4.1819 1.44001 0.821656 12.6215 B_highres.bmp 10 bpp 6912000 64 * Squirt-0 1873368 3.68961 1 0.0600851 1 65 bzip2 361385 19.1264 5.18386 0.400009 6.65738 66 szip-ec 1701702 4.06182 1.10088 0.067601 1.12509 67 szip-nn 2077745 3.32668 0.901635 0.0794411 1.32214 68 zlib-1 815701 8.47369 2.29664 0.116061 1.93161 69 zlib-2 775508 8.91287 2.41567 0.12058 2.00682 70 zlib-3 695275 9.94139 2.69443 0.1382 2.30007 71 zlib-5 601728 11.4869 3.11331 0.204429 3.40233 72 zlib-9 531795 12.9975 3.52273 0.859139 14.2987